import wx
from wx.lib.evtmgr import eventManager
from zope import interface
import os, sys

APPLICATION_INSTALL_DIR = os.environ.get('SIMPLEWATCHER_INSTALL')
if not APPLICATION_INSTALL_DIR:
    raise EnvironmentError("must set environment variable SIMPLEWATCHER_INSTALL")
sys.path.append('%s/lib' % APPLICATION_INSTALL_DIR)


class Registrar(object):
    def register(self,function, event, wxobject):
        eventManager.Register(function, event, wxobject)


registrar = Registrar()